home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1998 October A / Pcwk10a98.iso / Lotus / LOTUS / SMASTERS / APPROACH / SCHEDULE.MPR / SCRIPT / ApproachDoc / Schedule Display / Body / btnRemove.s (.txt) < prev    next >
Encoding:
Null Bytes Alternating  |  1997-01-09  |  3.3 KB  |  43 lines

  1. '++LotusScript Development Environment:2:5:(Options):0:66
  2.  
  3. '++LotusScript Development Environment:2:5:(Forward):0:1
  4. Declare Sub Click(Source As Button, X As Long, Y As Long, Flags As Long)
  5.  
  6. '++LotusScript Development Environment:2:5:(Declarations):0:2
  7.  
  8. '++LotusScript Development Environment:2:2:BindEvents:1:129
  9. Private Sub BindEvents(Byval Objectname_ As String)
  10.     Static Source As BUTTON
  11.     Set Source = Bind(Objectname_)
  12.     On Event Click From Source Call Click
  13. End Sub
  14.  
  15. '++LotusScript Development Environment:2:2:Click:1:12
  16. Sub Click(Source As Button, X As Long, Y As Long, Flags As Long)
  17. ' Click event for btnRemove button in the Schedule Display view
  18. ' Sets up the Done button on the Reservation view to read "Remove",
  19. ' fills global variables with the date currently displayed in the Schedule
  20. ' Display view and with blanks for room, start and end time, and switches
  21. ' to the Reservation view, which displays as a dialog box.
  22.     
  23.     Dim btn As button        ' Stores a shorten reference to the Done button
  24.                             ' on the Reservation view
  25.     
  26.     ' Assign "btn" as the reference to the Done button on the Reservation view    
  27.     ' The object on the other view is referenced through the global variable CurrentDocument
  28.     Set btn =     currentdocument.reservation.body.btnDone
  29.     
  30.     ' Change the label on the Done button to "Remove"
  31.     ' Note that the label change occurs before the view is visible. 
  32.     btn.text = "Remove"
  33.     
  34.     ' Fill global variables with reservation information
  35.     GlobDateDisplay = source.fbxDateDisplay.text
  36.     GlobStartTime = ""
  37.     GlobEndTime = ""
  38.     GlobRoom = ""
  39.     
  40.     ' Switch to the Reservation view
  41.     Set currentwindow.activeview = currentdocument.Reservation
  42.     
  43. End Sub        ' Click event for btnRemove button on Schedule Display view